<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let num=0
        while(true){
            let i = +prompt('请选择操作:存钱1,取钱2,查看余额3,退出4')
            switch(i){
                case 1:
                    let a= +prompt('您准备存多少钱:')
                    num += a
                    alert(`您存了${a}元，您的余额为${num}`)
                    continue
                case 2:
                    let b= +prompt('您准备取多少钱:')
                    num -= b
                    alert(`您取了${b}元,还剩余${num}元`)
                    continue
                case 3:
                    alert(`您还剩余${num}元`)
                    continue
                case 4:
                    alert(`感谢使用!`)
            }
                break
        }
    </script>
</body>
</html> 